/*左右两边圆弧的按钮-颜色充满*/
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:frametrim/utility/screen.dart';
//点击事件回调
class ButtonCircleView extends StatelessWidget{
  late final String textStr;
  late final Color textColor;
  late final Color buttonColor;
  late final VoidCallback onPress;


  ButtonCircleView(this.textStr, this.textColor, this.buttonColor,this.onPress);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 45,
      width: Screen.width,
      margin: EdgeInsets.fromLTRB(28, 0, 28, 0),
      child: RaisedButton(
        /*按钮颜色*/
        color: buttonColor,
        textColor: textColor,
        child: Text(textStr,style: TextStyle(fontSize: 16),),
        /*圆角样式*/
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.only(
            topLeft: Radius.circular(25),topRight: Radius.circular(25),bottomRight: Radius.circular(25),bottomLeft: Radius.circular(25)
          )
        ),
        // 水波动画中水波的颜色
        splashColor: buttonColor,

        onPressed: onPress,
      ),
    );
  }

}